<?php  
$mktime=mktime(date('his'));
$i_bor = $this->Html->image('iconos/icons/borrar.png', array('align'=>'absmiddle','alt' => 'Borrar', 'title' => 'Eliminar Unidad Productiva', 'border'=>'0', 'width' => '20', 'height' => '20'));
echo $this->For->filset('Unidad Productiva Asociadas al Productor',1, 0,null,1);
?>
<br>
	
<?php
$busq='';
if(count($lista_datos_fincas)>0) 
{

		$this->For->table($mktime);
		$this->For->tr($mktime,'');
		$this->For->td('<b>#</b>','','c','20px');
		$this->For->td('<b>Unidad Productiva</b>','','c');
		$this->For->td('<b>Tenencia</b>','','c');
		$this->For->td('<b>Ubicacion</b>','','c');
		$this->For->td('<b>HA Productiva</b>','','c');
		$this->For->td('<b>HA Productiva</b>','','c');
		$this->For->td('<b>Rubros</b>','','c');
		$this->For->td('<b>Acciones</b>','','c');
		$this->For->tr('');
		
		for($z=0; $z<count($lista_datos_fincas); $z++)
		{ 
				if ($z % 2 == 0) $class = "#FFFFFF"; else $class = "#F0F0F0";
				$cedrif=$this->For->id('',$lista_datos_fincas[$z]['Finca_base']['cedrif']);
				$id=$this->For->id('',$lista_datos_fincas[$z]['Finca_base']['id']);
				$t1=$id.'ayuda';
				$t2=$id.'links';
				$pre=$id.'preg';
				$num=$this->For->armar_numero(($z+1));
				$a=$lista_datos_fincas[$z]['Finca_base']['nombre'];
				$b=$lista_datos_fincas[$z]['Tenencia']['nombre'];
				$c=$lista_datos_fincas[$z]['Estado']['nombre']."/".$lista_datos_fincas[$z]['Municipio']['nombre']."/".$lista_datos_fincas[$z]['Parroquia']['nombre']."/".$lista_datos_fincas[$z]['Finca_base']['direccion'];
				$d=$lista_datos_fincas[$z]['Finca_base']['cantidad_has'];
				$e=$lista_datos_fincas[$z]['Finca_base']['has_productivas'];
				$f=$lista_datos_fincas[$z]['Rubro']['rubros'];
				
				
				$this->Json->tipsayuda($t1,"$num $a $b $c $d $e $f",'info',400);
				$this->For->tr($mktime,$class,$t1);
				$this->For->td($num,$busq,'r');
				$this->For->td($a,$busq);
				$this->For->td($b,$busq);
				$this->For->td($c,$busq,'','','',"dir_fin_lis$z",40);
				$this->For->td($d,$busq);
				$this->For->td($e,$busq);
				$this->For->td($f,$busq);
				
				$eve_bor=$this->For->ajax('','TARJETAPRODUCTIVA/quitar_finca/'.$id.'/'.$cedrif,'ver_fincas_cargadas',null,array($t2,'¿DESEAS ELIMINAR ESTA LA UNIDAD PRODUCTIVA DEL PRODUCTOR?'));

				
	 			echo "<td width='auto' id='$t2'>"; 
				?><a id="<?=$t2;?>" onclick="<?=$eve_bor;?>"><?=$this->For->accion($i_bor);?></a>
				<?="</td>";
				$this->For->tr('');
	} 
	$this->For->table('');
}
else 
{
		$this->For->table($mktime);
		$this->For->tr($mktime,'#FFFFFF');
		$this->For->td("<font color='red' size='-1'>No Se Encrontraron Registros</font>",'','c','100%');
		$this->For->tr('');
		$this->For->table('');
}
?>
<br />
<?=$this->For->filset();?>
